package com.suse.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@TableName(value = "employer")
public class Employer {
    // 员工id,主键
    @TableId(value = "employer_id",type = IdType.AUTO)
    private Integer employerId;
    // 员工姓名
    @Size(max = 10, min = 1, message = "你的员/工姓名长度必须是1-10位")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{0,}$", message = "员工姓名必须是中文")
    @TableField(value = "employer_name")
    private String employerName;

    //性别
//    @Pattern(regexp = "^[0-9]*$", message = "性别只能是1或者2")
    @TableField(value = "gender")
    private Integer gender;
    // 出生日期
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}$", message = "生日必须是日期")
    @TableField(value = "date_birth")
    private String dateBirth;
    // 手机号
    @TableField(value = "phone")
    private String phone;
    // 邮箱地址
    @TableField(value = "email")
    private String email;
    // 学历
    @TableField(value = "education")
    private Integer education;
    // 部门
    @TableField(value = "department")
    private String department;
    // 职务
    @TableField(value = "position")
    private String position;

    // 逻辑删除
    @TableLogic
    private Integer deleteTag;
}
